﻿// -----------------------------------------------------------------------------
// 园丁,是个很简单的管理系统
//  gitee:https://gitee.com/hgflydream/Gardener 
//  issues:https://gitee.com/hgflydream/Gardener/issues 
// -----------------------------------------------------------------------------

namespace Gardener.Weighbridge.Client.Services
{
    /// <summary>
    ///  WeighingRecord服务
    /// </summary>
    [ScopedService]
    public class WeighingRecordService : ClientServiceBase<WeighingRecordDto, Guid>, IWeighingRecordService
    {
        /// <summary>
        ///  WeighingRecord服务
        /// </summary>
        public WeighingRecordService(IApiCaller apiCaller) : base(apiCaller, "weighing-record", "weighbridge")
        {
        }

        public Task<WeighingRecordDto?> FindLastByPlateNumber(string plateNumber)
        {
            return apiCaller.GetAsync<WeighingRecordDto?>($"{baseUrl}/last-by-plate-number/{plateNumber}");
        }
    }
}
